<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Goods extends Model
{
    protected $fillable = [
        'serial',
        'symbol',
        'style',
        'postion',
        'name',
        'category',
        'brand',
        'color',
        'size',
        'number',
        'price',
        'state',
        'picurl',
        'remark',
        'users_id',
    ];

    public function getStyleAttribute($value)
    {
        return Dics::where('val', $value)->first();
    }

    public function getPostionAttribute($value)
    {
        return Dics::where('val', $value)->first();
    }


    public function getCategoryAttribute($value)
    {
        return Dics::where('val', $value)->first();
    }


    public function getColorAttribute($value)
    {
        return Dics::where('val', $value)->first();
    }

    public function getSizeAttribute($value)
    {
        return Dics::where('val', $value)->first();
    }

}
